import service from "utils/request"

// 获取部门列表
export const getPostList = (params) => {
  return service({
    url: "/post/getPostList",
    method: "get",
    params
  })
}

// 新增部门
export const createPost = (data) => {
  return service({
    url: "/post/createPost",
    method: "post",
    data
  })
}

// 更新部门
export const updatePost = (data) => {
  return service({
    url: "/post/updatePost",
    method: "put",
    data
  })
}

// 删除部门
export const deletePost = (data) => {
  return service({
    url: "/post/deletePost",
    method: "delete",
    data
  })
}

// 查询当前部门
export const queryPost = (id) => {
  return service({
    url: `/post/queryPost/${id}`,
    method: "get"
  })
}
